package com.tc.data.test.repository;

import java.util.List;

import com.tc.data.common.annotation.TableSharding;
import com.tc.data.test.entity.Tc;
import com.tc.data.test.entity.TcExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

@Repository
public interface TcMapper {
    int countByExample(TcExample example);

    int deleteByExample(TcExample example);

    int insert(Tc record);

    int insertSelective(Tc record);

    List<Tc> selectByExample(TcExample example);

    int updateByExampleSelective(@Param("record") Tc record, @Param("example") TcExample example);

    int updateByExample(@Param("record") Tc record, @Param("example") TcExample example);

    List<Tc> selectPageByExample(@Param("example") TcExample example, @Param("pageable") Pageable pageable);

    @TableSharding(strategy = "tc", key = "#id")
    List<Tc> selectByTableName(@Param("id") String id); //此处必须加@Param

}